home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / komercni software / miton / SystemMechanic7Pro.exe / {app} / smhtml.dll / 1033 / HTML / RADTABSTRIP.JS < prev    next >
Text File  |  2008-01-24  |  49KB  |  1,899 lines

  1. if(typeof (window.RadTabStripNamespace)=="undefined"){
  2. window.RadTabStripNamespace=new Object();
  3. }
  4. RadTabStripNamespace.ItemGroup=function(_1,_2){
  5. this.Size=0;
  6. this.ExpandableSize=0;
  7. this.FixedSize=0;
  8. this.Items=[];
  9. this.SizeMethod=_2;
  10. this.SizeProperty=_1;
  11. };
  12. RadTabStripNamespace.ItemGroup.prototype.RegisterItem=function(_3,_4){
  13. var _5=_3.className.indexOf("separator")>-1;
  14. if(_5){
  15. _4=true;
  16. }else{
  17. _3=_3.firstChild;
  18. }
  19. this.Size+=RadTabStripNamespace.Box[this.SizeMethod](_3);
  20. if(_5||(_4&&_3.firstChild.firstChild.style[this.SizeProperty])){
  21. this.FixedSize+=RadTabStripNamespace.Box[this.SizeMethod](_3);
  22. return;
  23. }
  24. this.ExpandableSize+=RadTabStripNamespace.Box[this.SizeMethod](_3);
  25. this.Items[this.Items.length]=_3;
  26. };
  27. RadTabStripNamespace.Align=function(_6,_7,_8){
  28. this.Element=_6;
  29. this.ItemGroups=[];
  30. if(_7=="horizontal"){
  31. this.OuterSizeMethod="GetOuterWidth";
  32. this.InnerSizeMethod="GetInnerWidth";
  33. this.SetSizeMethod="SetOuterWidth";
  34. this.OffsetProperty="offsetTop";
  35. this.SizeProperty="width";
  36. }else{
  37. this.OuterSizeMethod="GetOuterHeight";
  38. this.InnerSizeMethod="GetInnerHeight";
  39. this.SetSizeMethod="SetOuterHeight";
  40. this.OffsetProperty="offsetLeft";
  41. this.SizeProperty="height";
  42. }
  43. this.SkipFixedSize=_8;
  44. if(!this.Element.ItemGroups){
  45. this.BuildItemGroups();
  46. this.Element.ItemGroups=this.ItemGroups;
  47. }else{
  48. this.ItemGroups=this.Element.ItemGroups;
  49. }
  50. };
  51. RadTabStripNamespace.Align.prototype.CreateItemGroup=function(){
  52. return new RadTabStripNamespace.ItemGroup(this.SizeProperty,this.OuterSizeMethod);
  53. };
  54. RadTabStripNamespace.Align.prototype.BuildItemGroups=function(){
  55. var _9=3;
  56. var _a=this.Element.childNodes;
  57. var _b=0;
  58. var _c=-1;
  59. this.ItemGroups[0]=this.CreateItemGroup();
  60. for(var i=0;i<_a.length;i++){
  61. var _e=_a[i];
  62. var _f=_e[this.OffsetProperty];
  63. if(_e.nodeType==_9){
  64. continue;
  65. }
  66. if(_c==-1){
  67. _c=_f;
  68. }
  69. if(_f>_c+1){
  70. _b++;
  71. this.ItemGroups[_b]=this.CreateItemGroup();
  72. _c=_f;
  73. }
  74. this.ItemGroups[_b].RegisterItem(_e);
  75. }
  76. this.CalculateItemSizePercentage();
  77. };
  78. RadTabStripNamespace.Align.prototype.CalculateItemSizePercentage=function(){
  79. for(var j=0;j<this.ItemGroups.length;j++){
  80. var _11=this.ItemGroups[j];
  81. for(var i=0;i<_11.Items.length;i++){
  82. var _13=_11.Items[i];
  83. if(this.SkipFixedSize&&_13.style[this.SizeProperty]){
  84. continue;
  85. }
  86. var _14=RadTabStripNamespace.Box[this.OuterSizeMethod](_13);
  87. var _15=RadTabStripNamespace.Box[this.OuterSizeMethod](_13.firstChild.firstChild);
  88. if(_11.ExpandableSize==0){
  89. _13.Percentage=0;
  90. }else{
  91. _13.Percentage=_14/_11.ExpandableSize;
  92. }
  93. _13.PaddingDiff=_14-_15;
  94. }
  95. }
  96. };
  97. RadTabStripNamespace.Align.prototype.InterateOverRows=function(_16){
  98. var _17=RadTabStripNamespace.Box[this.InnerSizeMethod](this.Element);
  99. for(var j=0;j<this.ItemGroups.length;j++){
  100. if(!this.ItemGroups[j].Items.length){
  101. continue;
  102. }
  103. _16(this.ItemGroups[j],_17);
  104. }
  105. };
  106. RadTabStripNamespace.Align.Justify=function(_19){
  107. var _1a=new RadTabStripNamespace.Align(_19,"horizontal",true);
  108. var _1b=function(row,_1d){
  109. for(var i=0;i<row.Items.length;i++){
  110. var _1f=row.Items[i];
  111. var _20=_1f.Percentage*(_1d-row.FixedSize)-_1f.PaddingDiff;
  112. var _21=_1f.firstChild.firstChild;
  113. RadTabStripNamespace.Box.SetOuterWidth(_21,Math.floor(_20));
  114. }
  115. };
  116. _1a.InterateOverRows(_1b);
  117. };
  118. RadTabStripNamespace.Align.Right=function(_22){
  119. var _23=new RadTabStripNamespace.Align(_22,"horizontal");
  120. var _24=function(row,_26){
  121. var _27=row.Items[0];
  122. _27.style.marginLeft=(_26-row.Size-1)+"px";
  123. _27.style.cssText=_27.style.cssText;
  124. };
  125. _23.InterateOverRows(_24);
  126. };
  127. RadTabStripNamespace.Align.Center=function(_28){
  128. var _29=new RadTabStripNamespace.Align(_28,"horizontal");
  129. var _2a=function(row,_2c){
  130. var _2d=row.Items[0];
  131. var _2e=Math.floor((_2c-row.Size)/2)+"px";
  132. _2d.style.marginLeft=_2e;
  133. _2d.style.cssText=_2d.style.cssText;
  134. };
  135. _29.InterateOverRows(_2a);
  136. };
  137. RadTabStripNamespace.Align.VJustify=function(_2f){
  138. var _30=new RadTabStripNamespace.Align(_2f,"vertical",true);
  139. var _31=function(row,_33){
  140. for(var i=0;i<row.Items.length;i++){
  141. var _35=row.Items[i];
  142. var _36=_35.Percentage*(_33-row.FixedSize)-_35.PaddingDiff;
  143. var _37=_35.firstChild.firstChild;
  144. RadTabStripNamespace.Box.SetOuterHeight(_37,Math.floor(_36));
  145. }
  146. };
  147. _30.InterateOverRows(_31);
  148. };
  149. RadTabStripNamespace.Align.Bottom=function(_38){
  150. var _39=new RadTabStripNamespace.Align(_38,"vertical");
  151. var _3a=function(row,_3c){
  152. var _3d=row.Items[0];
  153. _3d.style.marginTop=(_3c-row.Size-1)+"px";
  154. };
  155. _39.InterateOverRows(_3a);
  156. };
  157. RadTabStripNamespace.Align.Middle=function(_3e){
  158. var _3f=new RadTabStripNamespace.Align(_3e,"vertical");
  159. var _40=function(row,_42){
  160. var _43=row.Items[0];
  161. var _44=Math.floor((_42-row.Size)/2)+"px";
  162. _43.style.marginTop=_44;
  163. };
  164. _3f.InterateOverRows(_40);
  165. };;if(typeof (window.RadTabStripNamespace)=="undefined"){
  166. window.RadTabStripNamespace=new Object();
  167. }
  168. RadTabStripNamespace.Box={GetOuterWidth:function(_1){
  169. var _2=this.GetCurrentStyle(_1);
  170. return _1.offsetWidth+this.GetHorizontalMarginValue(_2);
  171. },GetOuterHeight:function(_3){
  172. var _4=this.GetCurrentStyle(_3);
  173. return _3.offsetHeight+this.GetVerticalMarginValue(_4);
  174. },GetInnerWidth:function(_5){
  175. var _6=this.GetCurrentStyle(_5);
  176. return _5.offsetWidth-this.GetHorizontalPaddingAndBorderValue(_6);
  177. },GetInnerHeight:function(_7){
  178. var _8=this.GetCurrentStyle(_7);
  179. return _7.offsetHeight-this.GetVerticalPaddingAndBorderValue(_8);
  180. },SetOuterWidth:function(_9,_a){
  181. var _b=this.GetCurrentStyle(_9);
  182. _a-=this.GetHorizontalMarginValue(_b);
  183. if(RadControlsNamespace.Browser.StandardsMode){
  184. _a-=this.GetHorizontalPaddingAndBorderValue(_b);
  185. }
  186. if(_a<0){
  187. _9.style.width="auto";
  188. }else{
  189. _9.style.width=_a+"px";
  190. }
  191. },SetOuterHeight:function(_c,_d){
  192. var _e=_d;
  193. var _f=this.GetCurrentStyle(_c);
  194. _d-=this.GetVerticalMarginValue(_f);
  195. if(RadControlsNamespace.Browser.StandardsMode){
  196. _d-=this.GetVerticalPaddingAndBorderValue(_f);
  197. }
  198. _c.style.height=_d+"px";
  199. var _10=this.GetOuterHeight(_c);
  200. if(_10!=_e){
  201. var _11=(_10-_e);
  202. var _12=(_e-_11);
  203. if(_12>0){
  204. _c.style.height=_12+"px";
  205. }
  206. }
  207. },SafeParseInt:function(_13){
  208. var _14=parseInt(_13);
  209. return isNaN(_14)?0:_14;
  210. },GetStyleValues:function(_15){
  211. var _16=0;
  212. for(var i=1;i<arguments.length;i++){
  213. _16+=this.SafeParseInt(_15[arguments[i]]);
  214. }
  215. return _16;
  216. },GetHorizontalPaddingAndBorderValue:function(_18){
  217. return this.GetStyleValues(_18,"borderLeftWidth","paddingLeft","paddingRight","borderRightWidth");
  218. },GetVerticalPaddingAndBorderValue:function(_19){
  219. return this.GetStyleValues(_19,"borderTopWidth","paddingTop","paddingBottom","borderBottomWidth");
  220. },GetHorizontalMarginValue:function(_1a){
  221. return this.GetStyleValues(_1a,"marginLeft","marginRight");
  222. },GetVerticalMarginValue:function(_1b){
  223. return this.GetStyleValues(_1b,"marginTop","marginBottom");
  224. },GetCurrentStyle:function(_1c){
  225. if(_1c.currentStyle){
  226. return _1c.currentStyle;
  227. }else{
  228. if(document.defaultView&&document.defaultView.getComputedStyle){
  229. return document.defaultView.getComputedStyle(_1c,null);
  230. }else{
  231. return null;
  232. }
  233. }
  234. }};;if(typeof window.RadControlsNamespace=="undefined"){
  235. window.RadControlsNamespace={};
  236. }
  237. if(typeof (window.RadControlsNamespace.Browser)=="undefined"||typeof (window.RadControlsNamespace.Browser.Version)==null||window.RadControlsNamespace.Browser.Version<1){
  238. window.RadControlsNamespace.Browser={Version:1};
  239. window.RadControlsNamespace.Browser.ParseBrowserInfo=function(){
  240. this.IsMacIE=(navigator.appName=="Microsoft Internet Explorer")&&((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)||(navigator.appVersion.toLowerCase().indexOf("mac")!=-1));
  241. this.IsSafari=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);
  242. this.IsSafari3=(this.IsSafari&&navigator.userAgent.toLowerCase().indexOf("ersion/3.")!=-1);
  243. this.IsMozilla=window.netscape&&!window.opera;
  244. this.IsNetscape=/Netscape/.test(navigator.userAgent);
  245. this.IsOpera=window.opera;
  246. this.IsOpera9=window.opera&&(parseInt(window.opera.version())>8);
  247. this.IsIE=!this.IsMacIE&&!this.IsMozilla&&!this.IsOpera&&!this.IsSafari;
  248. this.IsIE7=/MSIE 7/.test(navigator.appVersion);
  249. this.StandardsMode=this.IsSafari||this.IsOpera9||this.IsMozilla||document.compatMode=="CSS1Compat";
  250. this.IsMac=/Mac/.test(navigator.userAgent);
  251. };
  252. RadControlsNamespace.Browser.ParseBrowserInfo();
  253. };if(typeof window.RadControlsNamespace=="undefined"){
  254. window.RadControlsNamespace={};
  255. }
  256. if(typeof (window.RadControlsNamespace.DomEventMixin)=="undefined"||typeof (window.RadControlsNamespace.DomEventMixin.Version)==null||window.RadControlsNamespace.DomEventMixin.Version<3){
  257. RadControlsNamespace.DomEventMixin={Version:3,Initialize:function(_1){
  258. _1.CreateEventHandler=this.CreateEventHandler;
  259. _1.AttachDomEvent=this.AttachDomEvent;
  260. _1.DetachDomEvent=this.DetachDomEvent;
  261. _1.DisposeDomEventHandlers=this.DisposeDomEventHandlers;
  262. _1._domEventHandlingEnabled=true;
  263. _1.EnableDomEventHandling=this.EnableDomEventHandling;
  264. _1.DisableDomEventHandling=this.DisableDomEventHandling;
  265. _1.RemoveHandlerRegister=this.RemoveHandlerRegister;
  266. _1.GetHandlerRegister=this.GetHandlerRegister;
  267. _1.AddHandlerRegister=this.AddHandlerRegister;
  268. _1.handlerRegisters=[];
  269. },EnableDomEventHandling:function(){
  270. this._domEventHandlingEnabled=true;
  271. },DisableDomEventHandling:function(){
  272. this._domEventHandlingEnabled=false;
  273. },CreateEventHandler:function(_2,_3){
  274. var _4=this;
  275. return function(e){
  276. if(!_4._domEventHandlingEnabled&&!_3){
  277. return;
  278. }
  279. return _4[_2](e||window.event);
  280. };
  281. },AttachDomEvent:function(_6,_7,_8,_9){
  282. var _a=this.CreateEventHandler(_8,_9);
  283. var _b=this.GetHandlerRegister(_6,_7,_8);
  284. if(_b!=null){
  285. this.DetachDomEvent(_b.Element,_b.EventName,_8);
  286. }
  287. var _c={"Element":_6,"EventName":_7,"HandlerName":_8,"Handler":_a};
  288. this.AddHandlerRegister(_c);
  289. if(_6.addEventListener){
  290. _6.addEventListener(_7,_a,false);
  291. }else{
  292. if(_6.attachEvent){
  293. _6.attachEvent("on"+_7,_a);
  294. }
  295. }
  296. },DetachDomEvent:function(_d,_e,_f){
  297. var _10=null;
  298. var _11="";
  299. if(typeof _f=="string"){
  300. _11=_f;
  301. _10=this.GetHandlerRegister(_d,_e,_11);
  302. if(_10==null){
  303. return;
  304. }
  305. _f=_10.Handler;
  306. }
  307. if(!_d){
  308. return;
  309. }
  310. if(_d.removeEventListener){
  311. _d.removeEventListener(_e,_f,false);
  312. }else{
  313. if(_d.detachEvent){
  314. _d.detachEvent("on"+_e,_f);
  315. }
  316. }
  317. if(_10!=null&&_11!=""){
  318. this.RemoveHandlerRegister(_10);
  319. _10=null;
  320. }
  321. },DisposeDomEventHandlers:function(){
  322. for(var i=0;i<this.handlerRegisters.length;i++){
  323. var _13=this.handlerRegisters[i];
  324. if(_13!=null){
  325. this.DetachDomEvent(_13.Element,_13.EventName,_13.Handler);
  326. }
  327. }
  328. this.handlerRegisters=[];
  329. },RemoveHandlerRegister:function(_14){
  330. try{
  331. var _15=_14.index;
  332. for(var i in _14){
  333. _14[i]=null;
  334. }
  335. this.handlerRegisters[_15]=null;
  336. }
  337. catch(e){
  338. }
  339. },GetHandlerRegister:function(_17,_18,_19){
  340. for(var i=0;i<this.handlerRegisters.length;i++){
  341. var _1b=this.handlerRegisters[i];
  342. if(_1b!=null&&_1b.Element==_17&&_1b.EventName==_18&&_1b.HandlerName==_19){
  343. return this.handlerRegisters[i];
  344. }
  345. }
  346. return null;
  347. },AddHandlerRegister:function(_1c){
  348. _1c.index=this.handlerRegisters.length;
  349. this.handlerRegisters[this.handlerRegisters.length]=_1c;
  350. }};
  351. RadControlsNamespace.DomEvent={};
  352. RadControlsNamespace.DomEvent.PreventDefault=function(e){
  353. if(!e){
  354. return true;
  355. }
  356. if(e.preventDefault){
  357. e.preventDefault();
  358. }
  359. e.returnValue=false;
  360. return false;
  361. };
  362. RadControlsNamespace.DomEvent.StopPropagation=function(e){
  363. if(!e){
  364. return;
  365. }
  366. if(e.stopPropagation){
  367. e.stopPropagation();
  368. }else{
  369. e.cancelBubble=true;
  370. }
  371. };
  372. RadControlsNamespace.DomEvent.GetTarget=function(e){
  373. if(!e){
  374. return null;
  375. }
  376. return e.target||e.srcElement;
  377. };
  378. RadControlsNamespace.DomEvent.GetRelatedTarget=function(e){
  379. if(!e){
  380. return null;
  381. }
  382. return e.relatedTarget||(e.type=="mouseout"?e.toElement:e.fromElement);
  383. };
  384. RadControlsNamespace.DomEvent.GetKeyCode=function(e){
  385. if(!e){
  386. return 0;
  387. }
  388. return e.which||e.keyCode;
  389. };
  390. };if(typeof window.RadControlsNamespace=="undefined"){
  391. window.RadControlsNamespace={};
  392. }
  393. if(typeof (window.RadControlsNamespace.EventMixin)=="undefined"||typeof (window.RadControlsNamespace.EventMixin.Version)==null||window.RadControlsNamespace.EventMixin.Version<2){
  394. RadControlsNamespace.EventMixin={Version:2,Initialize:function(_1){
  395. _1._listeners={};
  396. _1._eventsEnabled=true;
  397. _1.AttachEvent=this.AttachEvent;
  398. _1.DetachEvent=this.DetachEvent;
  399. _1.RaiseEvent=this.RaiseEvent;
  400. _1.EnableEvents=this.EnableEvents;
  401. _1.DisableEvents=this.DisableEvents;
  402. _1.DisposeEventHandlers=this.DisposeEventHandlers;
  403. },DisableEvents:function(){
  404. this._eventsEnabled=false;
  405. },EnableEvents:function(){
  406. this._eventsEnabled=true;
  407. },AttachEvent:function(_2,_3){
  408. if(!this._listeners[_2]){
  409. this._listeners[_2]=[];
  410. }
  411. this._listeners[_2][this._listeners[_2].length]=(RadControlsNamespace.EventMixin.ResolveFunction(_3));
  412. },DetachEvent:function(_4,_5){
  413. var _6=this._listeners[_4];
  414. if(!_6){
  415. return false;
  416. }
  417. var _7=RadControlsNamespace.EventMixin.ResolveFunction(_5);
  418. for(var i=0;i<_6.length;i++){
  419. if(_7==_6[i]){
  420. _6.splice(i,1);
  421. return true;
  422. }
  423. }
  424. return false;
  425. },DisposeEventHandlers:function(){
  426. for(var _9 in this._listeners){
  427. var _a=null;
  428. if(this._listeners.hasOwnProperty(_9)){
  429. _a=this._listeners[_9];
  430. for(var i=0;i<_a.length;i++){
  431. _a[i]=null;
  432. }
  433. _a=null;
  434. }
  435. }
  436. },ResolveFunction:function(_c){
  437. if(typeof (_c)=="function"){
  438. return _c;
  439. }else{
  440. if(typeof (window[_c])=="function"){
  441. return window[_c];
  442. }else{
  443. return new Function("var Sender = arguments[0]; var Arguments = arguments[1];"+_c);
  444. }
  445. }
  446. },RaiseEvent:function(_d,_e){
  447. if(!this._eventsEnabled){
  448. return true;
  449. }
  450. var _f=true;
  451. if(this[_d]){
  452. var _10=RadControlsNamespace.EventMixin.ResolveFunction(this[_d])(this,_e);
  453. if(typeof (_10)=="undefined"){
  454. _10=true;
  455. }
  456. _f=_f&&_10;
  457. }
  458. if(!this._listeners[_d]){
  459. return _f;
  460. }
  461. for(var i=0;i<this._listeners[_d].length;i++){
  462. var _12=this._listeners[_d][i];
  463. var _10=_12(this,_e);
  464. if(typeof (_10)=="undefined"){
  465. _10=true;
  466. }
  467. _f=_f&&_10;
  468. }
  469. return _f;
  470. }};
  471. };if(typeof window.RadControlsNamespace=="undefined"){
  472. window.RadControlsNamespace={};
  473. }
  474. if(typeof (window.RadControlsNamespace.JSON)=="undefined"||typeof (window.RadControlsNamespace.JSON.Version)==null||window.RadControlsNamespace.JSON.Version<1){
  475. window.RadControlsNamespace.JSON={Version:1,copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(v,_2){
  476. var a=[];
  477. var _4=arguments[2]||{};
  478. function e(s){
  479. a[a.length]=s;
  480. }
  481. function g(x){
  482. var c,i,l,v;
  483. switch(typeof x){
  484. case "object":
  485. if(x){
  486. if(x instanceof Array){
  487. e("[");
  488. l=a.length;
  489. for(i=0;i<x.length;i+=1){
  490. v=x[i];
  491. if(typeof v!="undefined"&&typeof v!="function"){
  492. if(l<a.length){
  493. e(",");
  494. }
  495. g(v);
  496. }
  497. }
  498. e("]");
  499. return "";
  500. }else{
  501. if(typeof x.valueOf=="function"){
  502. e("{");
  503. l=a.length;
  504. for(i in x){
  505. v=x[i];
  506. if(_2&&v==_2[i]){
  507. continue;
  508. }
  509. var _a=typeof v;
  510. if(_a=="undefined"||_a=="function"){
  511. continue;
  512. }
  513. if(_a=="object"&&!_4[i]){
  514. continue;
  515. }
  516. if(l<a.length){
  517. e(",");
  518. }
  519. g(i);
  520. e(":");
  521. g(v);
  522. }
  523. return e("}");
  524. }
  525. }
  526. }
  527. e("null");
  528. return "";
  529. case "number":
  530. e(isFinite(x)?+x:"null");
  531. return "";
  532. case "string":
  533. l=x.length;
  534. e("\"");
  535. for(i=0;i<l;i+=1){
  536. c=x.charAt(i);
  537. if(c>=" "){
  538. if(c=="\\"||c=="\""){
  539. e("\\");
  540. }
  541. e(c);
  542. }else{
  543. switch(c){
  544. case "\b":
  545. e("\\b");
  546. break;
  547. case "\f":
  548. e("\\f");
  549. break;
  550. case "\n":
  551. e("\\n");
  552. break;
  553. case "\r":
  554. e("\\r");
  555. break;
  556. case "\t":
  557. e("\\t");
  558. break;
  559. default:
  560. c=c.charCodeAt();
  561. e("\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16));
  562. }
  563. }
  564. }
  565. e("\"");
  566. return "";
  567. case "boolean":
  568. e(String(x));
  569. return "";
  570. default:
  571. e("null");
  572. return "";
  573. }
  574. }
  575. g(v,0);
  576. return a.join("");
  577. },stringifyHashTable:function(_b,_c,_d){
  578. var a=[];
  579. if(!_d){
  580. _d=[];
  581. }
  582. for(var i=0;i<_b.length;i++){
  583. var ser=this.stringify(_b[i],_d[i]);
  584. if(ser=="{}"){
  585. continue;
  586. }
  587. a[a.length]="\""+_b[i][_c]+"\":"+ser;
  588. }
  589. return "{"+a.join(",")+"}";
  590. },parse:function(_11){
  591. return (/^([ \t\r\n,:{}\[\]]|"(\\["\\\/bfnrtu]|[^\x00-\x1f"\\]+)*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$/.test(_11))&&eval("("+_11+")");
  592. }};
  593. };
  594.  
  595. function RadMultiPage(id,_2){
  596.  
  597. var _3=window[id];
  598. if(_3!=null&&typeof (_3.Dispose)=="function"){
  599. _3.Dispose();
  600. }
  601. this.DomElement=document.getElementById(id);
  602. this.PageViews=_2;
  603. this.HiddenInput=document.getElementById(id+"_Selected");
  604. this.PageView=null;
  605. }
  606. RadMultiPage.prototype.Dispose=function(){
  607. if(this.disposed==null){
  608. return;
  609. }
  610. this.disposed=true;
  611. this.DomElement=null;
  612. this.HiddenInput=null;
  613. };
  614. RadMultiPage.prototype.GetSelectedIndex=function(){
  615. return parseInt(this.HiddenInput.value);
  616. };
  617. RadMultiPage.prototype.GetPageViewDomElement=function(_4){
  618. return document.getElementById(this.PageViews[_4].ClientID);
  619. };
  620. RadMultiPage.prototype.Show=function(_5){
  621. if(this.NavigateAfterClick){
  622. return;
  623. }
  624. _5.style.display="block";
  625. var _6=_5.getElementsByTagName("*");
  626. for(var i=0,_8=_6.length;i<_8;i++){
  627. var _9=_6[i];
  628. if(_9.RadShow){
  629. _9.RadShow();
  630. }
  631. }
  632. };
  633. RadMultiPage.prototype.Hide=function(_a){
  634. if(this.NavigateAfterClick){
  635. return;
  636. }
  637. _a.style.display="none";
  638. };
  639. RadMultiPage.prototype.SelectPageById=function(id){
  640. if(id=="Null"){
  641. return;
  642. }
  643. var _c=-1;
  644. for(var i=0;i<this.PageViews.length;i++){
  645. var _e=this.GetPageViewDomElement(i);
  646. if(this.PageViews[i].ID==id){
  647. if(_e){
  648. this.Show(this.GetPageViewDomElement(i));
  649. }
  650. _c=i;
  651. }else{
  652. if(_e){
  653. this.Hide(this.GetPageViewDomElement(i));
  654. }
  655. }
  656. }
  657. this.HiddenInput.value=_c;
  658. };
  659. RadMultiPage.prototype.SelectPageByIndex=function(_f){
  660. if(_f>=this.PageViews.length){
  661. return;
  662. }
  663. for(var i=0;i<this.PageViews.length;i++){
  664. var _11=this.GetPageViewDomElement(i);
  665. if(_11){
  666. if(i==_f){
  667. this.Show(_11);
  668. }else{
  669. this.Hide(_11);
  670. }
  671. }
  672. }
  673.  
  674. this.HiddenInput.value=_f;
  675. };;function RadTab(_1,_2){
  676. this.Parent=null;
  677. this.TabStrip=null;
  678. this.SelectedTab=null;
  679. this.SelectedIndex=-1;
  680. this.Selected=false;
  681. this.ScrollChildren=false;
  682. this.ScrollPosition=0;
  683. this.ScrollButtonsPosition=RadControlsNamespace.ScrollButtonsPosition.Right;
  684. this.PerTabScrolling=false;
  685. this.Tabs=[];
  686. this.PageViewID="";
  687. this.PageViewClientID="";
  688. this.Index=-1;
  689. this.GlobalIndex=-1;
  690. this.CssClass="";
  691. this.SelectedCssClass="selected";
  692. this.DisabledCssClass="disabled";
  693. this.NavigateAfterClick=false;
  694. this.Enabled=true;
  695. this.Value="";
  696. this.DepthLevel=-1;
  697. this.IsBreak=false;
  698. this.ID=_1.id;
  699. this.DomElement=_1;
  700. this.Text=_1.firstChild.firstChild.innerHTML;
  701. this.ImageDomElement=_1.getElementsByTagName("img")[0];
  702. if(this.ImageDomElement){
  703. if(_1.firstChild.firstChild.childNodes.length>1){
  704. this.Text=_1.firstChild.firstChild.childNodes[1].nodeValue;
  705. }else{
  706. this.Text="";
  707. }
  708. }
  709. this.ChildStripDomElement=_1.parentNode.getElementsByTagName("ul")[0];
  710. }
  711. RadTab.prototype.Initialize=function(){
  712. RadControlsNamespace.DomEventMixin.Initialize(this);
  713. this.AttachEventHandlers();
  714. if(this.TabStrip.TabData[this.ID]!=null){
  715. for(var _3 in this.TabStrip.TabData[this.ID]){
  716. this[_3]=this.TabStrip.TabData[this.ID][_3];
  717. }
  718. }
  719. RadTabStrip.CreateState(this);
  720. };
  721. RadTab.prototype.Dispose=function(){
  722. this.DisposeDomEventHandlers();
  723. for(var i in this.DomElement){
  724. if(typeof (this.DomElement[i])=="function"){
  725. this.DomElement[i]=null;
  726. }
  727. }
  728. if(this.Scroll){
  729. this.Scroll.Dispose();
  730. }
  731. this.DomElement=null;
  732. this.ImageDomElement=null;
  733. this.ChildStripDomElement=null;
  734. };
  735. RadTab.prototype.ClickHandler=function(e){
  736. return this.Click(e);
  737. };
  738. RadTab.prototype.MouseOverHandler=function(e){
  739. var a=this.DomElement;
  740. var _8=RadControlsNamespace.DomEvent.GetRelatedTarget(e);
  741. if(_8&&(_8==a||_8.parentNode==a||_8.parentNode.parentNode==a)){
  742. return;
  743. }
  744. if(this.Enabled){
  745. this.SetImageUrl(this.ImageOverUrl);
  746. }
  747. this.TabStrip.RaiseEvent("OnClientMouseOver",{Tab:this,EventObject:e});
  748. };
  749. RadTab.prototype.SetImageUrl=function(_9){
  750. if(!this.ImageDomElement||!_9){
  751. return;
  752. }
  753. _9=_9.replace(/&/ig,"&");
  754. if(this.ImageDomElement.src!=_9){
  755. this.ImageDomElement.src=_9;
  756. }
  757. };
  758. RadTab.prototype.IsChildOfTab=function(_a){
  759. while(_a.nodeType!==9){
  760. if(_a.parentNode==this.DomElement){
  761. return true;
  762. }
  763. _a=_a.parentNode;
  764. }
  765. return false;
  766. };
  767. RadTab.prototype.MouseOutHandler=function(e){
  768. var a=this.DomElement;
  769. var to=RadControlsNamespace.DomEvent.GetRelatedTarget(e);
  770. if(to&&(to==a||this.IsChildOfTab(to))){
  771. return;
  772. }
  773. if(this.Enabled){
  774. if(this.Parent.SelectedTab==this&&this.SelectedImageUrl){
  775. this.SetImageUrl(this.SelectedImageUrl);
  776. }else{
  777. this.SetImageUrl(this.ImageUrl);
  778. }
  779. }
  780. this.TabStrip.RaiseEvent("OnClientMouseOut",{Tab:this,EventObject:e});
  781. };
  782. RadTab.prototype.KeyPressHandler=function(e){
  783. };
  784. RadTab.prototype.FocusHandler=function(e){
  785. if(!e.altKey){
  786. return;
  787. }
  788. this.Click();
  789. var _10=this;
  790. setTimeout(function(){
  791. _10.DomElement.focus();
  792. },0);
  793. };
  794. RadTab.prototype.AttachEventHandlers=function(){
  795. this.AttachDomEvent(this.DomElement,"click","ClickHandler");
  796. this.AttachDomEvent(this.DomElement,"mouseover","MouseOverHandler");
  797. this.AttachDomEvent(this.DomElement,"contextmenu","ContextMenuHandler");
  798. this.AttachDomEvent(this.DomElement,"dblclick","DoubleClickHandler");
  799. this.AttachDomEvent(this.DomElement,"mouseout","MouseOutHandler");
  800. if(RadControlsNamespace.Browser.IsIE){
  801. this.AttachDomEvent(this.DomElement,"focus","FocusHandler");
  802. }
  803. };
  804. RadTab.prototype.DoubleClickHandler=function(e){
  805. if(!this.TabStrip.RaiseEvent("OnClientDoubleClick",{Tab:this,EventObject:e})){
  806. return RadControlsNamespace.DomEvent.PreventDefault(e);
  807. }
  808. };
  809. RadTab.prototype.ContextMenuHandler=function(e){
  810. if(!this.TabStrip.RaiseEvent("OnClientContextMenu",{Tab:this,EventObject:e})){
  811. return RadControlsNamespace.DomEvent.PreventDefault(e);
  812. }
  813. };
  814. RadTab.prototype.Validate=function(){
  815. if(!this.TabStrip.CausesValidation){
  816. return true;
  817. }
  818. if(typeof (Page_ClientValidate)!="function"){
  819. return true;
  820. }
  821. return Page_ClientValidate(this.TabStrip.ValidationGroup);
  822. };
  823. RadTab.prototype.Click=function(e){
  824. if((!this.Enabled)||(!this.Validate())){
  825. return RadControlsNamespace.DomEvent.PreventDefault(e);
  826. }
  827. var _14=this.NavigateAfterClick;
  828. if(this.DomElement.target&&this.DomElement.target!="_self"){
  829. _14=false;
  830. }
  831. if(!this.TabStrip.EnableImmediateNavigation){
  832. _14=false;
  833. }
  834. var _15=this.Select(_14);
  835. if((!_15)||(!this.NavigateAfterClick)){
  836. return RadControlsNamespace.DomEvent.PreventDefault(e);
  837. }else{
  838. if(!e||(this.ImageDomElement&&(e.srcElement==this.ImageDomElement))){
  839. var _16=this.DomElement.target;
  840. if(!_16||_16=="_self"){
  841. location.href=this.DomElement.href;
  842. }else{
  843. if(_16=="_blank"){
  844. window.open(this.DomElement.href);
  845. }else{
  846. if(top.frames[_16]){
  847. top.frames[_16].window.location.href=this.DomElement.href;
  848. }
  849. }
  850. }
  851. }
  852. }
  853. return true;
  854. };
  855. RadTab.prototype.InternalUnSelect=function(_17){
  856. this.Selected=false;
  857. this.Parent.SelectedTab=null;
  858. this.Parent.SelectedIndex=-1;
  859. if(this.SelectedTab!=null&&this.TabStrip.UnSelectChildren){
  860. this.SelectedTab.UnSelect(_17);
  861. }
  862. this.RecordState();
  863. };
  864. RadTab.prototype.UnSelect=function(_18){
  865. if(!this.Selected){
  866. return;
  867. }
  868. this.InternalUnSelect(_18);
  869. if(!_18){
  870. this.ModifyZIndex(-this.MaxZIndex);
  871. this.DomElement.className=this.CssClass;
  872. this.HideChildren();
  873. this.SetImageUrl(this.ImageUrl);
  874. }
  875. this.TabStrip.RaiseEvent("OnClientTabUnSelected",{Tab:this});
  876. };
  877. RadTab.prototype.RecordState=function(){
  878. this.InitialState.Selected=!this.Selected;
  879. var _19=RadControlsNamespace.JSON.stringify(this,this.InitialState);
  880. if(_19=="{}"){
  881. this.TabStrip.TabsState[this.ID]="";
  882. }else{
  883. this.TabStrip.TabsState[this.ID]="\""+this.ID+"\":"+_19;
  884. }
  885. this.TabStrip.RecordState();
  886. };
  887. RadTab.prototype.ModifyZIndex=function(_1a){
  888. this.DomElement.style.zIndex=parseInt(this.DomElement.style.zIndex)+_1a;
  889. this.DomElement.style.cssText=this.DomElement.style.cssText;
  890. };
  891. RadTab.prototype.InternalSelect=function(_1b){
  892. var _1c=this.Parent.SelectedTab;
  893. if(_1c){
  894. this.TabStrip.InUpdate=true;
  895. this.Parent.SelectedTab.UnSelect(_1b);
  896. this.TabStrip.InUpdate=false;
  897. }
  898. this.Selected=true;
  899. this.Parent.SelectedTab=this;
  900. this.Parent.SelectedIndex=this.Index;
  901. this.RecordState();
  902. };
  903. RadTab.prototype.Select=function(_1d){
  904. if(!this.Enabled){
  905. return false;
  906. }
  907. if(this.Selected&&!this.TabStrip.ClickSelectedTab){
  908. return false;
  909. }
  910. var _1e=this.Parent.SelectedTab;
  911. var _1f={Tab:this,PreviousTab:_1e};
  912. if(!this.TabStrip.RaiseEvent("OnClientTabSelecting",_1f)){
  913. return false;
  914. }
  915. this.TabStrip.SelectPageView(this);
  916. this.InternalSelect(_1d);
  917. if(!_1d){
  918. if(this.TabStrip.ReorderTabRows&&!this.TabStrip.RenderInProgress()){
  919. this.PopRow();
  920. }
  921. this.DomElement.className=this.SelectedCssClass;
  922. this.ModifyZIndex(this.MaxZIndex);
  923. this.FixFirstTabPosition();
  924. this.SetImageUrl(this.SelectedImageUrl);
  925. }
  926. this.ShowChildren(_1d);
  927. this.TabStrip.RaiseEvent("OnClientTabSelected",_1f);
  928. return true;
  929. };
  930. RadTab.prototype.FixFirstTabPosition=function(){
  931. if(this.Parent.Tabs[0]&&this.Parent.Tabs[0].DomElement){
  932. this.Parent.Tabs[0].DomElement.style.cssText=this.Parent.Tabs[0].DomElement.style.cssText;
  933. }
  934. };
  935. RadTab.prototype.SelectParents=function(){
  936. var _20=[];
  937. var _21=this;
  938. while(_21!=this.TabStrip){
  939. _20[_20.length]=_21;
  940. _21=_21.Parent;
  941. }
  942. var i=_20.length;
  943. while(i--){
  944. _20[i].Select();
  945. }
  946. };
  947. RadTab.prototype.IsVisible=function(){
  948. var _23=this.Parent;
  949. if(_23==this.TabStrip){
  950. return true;
  951. }
  952. while(_23!=this.TabStrip){
  953. if(!_23.Selected){
  954. return false;
  955. }
  956. _23=_23.Parent;
  957. }
  958. return true;
  959. };
  960. RadTab.prototype.ShowChildren=function(_24){
  961. if(!this.ChildStripDomElement){
  962. return;
  963. }
  964. if(!this.IsVisible()){
  965. return;
  966. }
  967. if(!_24){
  968. this.ChildStripDomElement.style.display="block";
  969. this.TabStrip.ShowLevels(this.DepthLevel);
  970. this.TabStrip.ApplyTabBreaks(this.ChildStripDomElement);
  971. this.TabStrip.AlignElement(this.ChildStripDomElement);
  972. if(this.ScrollChildren){
  973. this.TabStrip.MakeScrollable(this);
  974. }
  975. }
  976. if(this.SelectedTab){
  977. this.SelectedTab.Selected=false;
  978. this.SelectedTab.Select(_24);
  979. }
  980. };
  981. RadTab.prototype.HideChildren=function(){
  982. if(!this.ChildStripDomElement){
  983. return;
  984. }
  985. this.TabStrip.ShowLevels(this.DepthLevel-1);
  986. this.ChildStripDomElement.style.display="none";
  987. if(this.SelectedTab){
  988. this.SelectedTab.HideChildren();
  989. }
  990. };
  991. RadTab.prototype.Enable=function(){
  992. if(this.Enabled){
  993. return;
  994. }
  995. this.Enabled=true;
  996. this.DomElement.className=this.CssClass;
  997. this.DomElement.disabled="";
  998. this.RecordState();
  999. if(this.Parent.SelectedTab==this&&this.SelectedImageUrl){
  1000. this.SetImageUrl(this.SelectedImageUrl);
  1001. }else{
  1002. this.SetImageUrl(this.ImageUrl);
  1003. }
  1004. this.TabStrip.RaiseEvent("OnClientTabEnabled",{Tab:this});
  1005. };
  1006. RadTab.prototype.Disable=function(){
  1007. this.Enabled=false;
  1008. this.UnSelect();
  1009. this.DomElement.className=this.DisabledCssClass;
  1010. this.DomElement.disabled="disabled";
  1011. this.RecordState();
  1012. this.SetImageUrl(this.DisabledImageUrl);
  1013. this.TabStrip.RaiseEvent("OnClientTabDisabled",{Tab:this});
  1014. };
  1015. RadTab.prototype.OnScrollStop=function(){
  1016. this.RecordState();
  1017. };
  1018. RadTab.prototype.SetCssClass=function(_25){
  1019. this.CssClass=_25;
  1020. if(this.Enabled&&!this.Selected){
  1021. this.DomElement.className=_25;
  1022. }
  1023. };
  1024. RadTab.prototype.SetText=function(_26){
  1025. this.Text=_26;
  1026. var _27=this.DomElement.firstChild.firstChild;
  1027. var _28=_27.firstChild.nodeType==3?_27.firstChild:_27.childNodes[1];
  1028. _28.nodeValue=_26;
  1029. this.RecordState();
  1030. };
  1031. RadTab.prototype.SetDisabledCssClass=function(_29){
  1032. this.DisabledCssClass=_29;
  1033. if(!this.Enabled){
  1034. this.DomElement.className=_29;
  1035. }
  1036. };
  1037. RadTab.prototype.SetSelectedCssClass=function(_2a){
  1038. this.SelectedCssClass=_2a;
  1039. if(this.Selected){
  1040. this.DomElement.className=_2a;
  1041. }
  1042. };
  1043. RadTab.prototype.PopRow=function(){
  1044. var _2b=this.DomElement.parentNode.offsetTop;
  1045. if(this.IsBreak&&RadControlsNamespace.Browser.IsIE){
  1046. var _2c=RadTabStripNamespace.Box.GetCurrentStyle(this.DomElement);
  1047. _2b-=RadTabStripNamespace.Box.GetStyleValues(_2c,"marginTop");
  1048. }
  1049. var _2d=[];
  1050. for(var i=0;i<this.Parent.Tabs.length;i++){
  1051. var _2f=this.Parent.Tabs[i].DomElement.parentNode;
  1052. var _30=_2f.offsetTop;
  1053. var _2c=RadTabStripNamespace.Box.GetCurrentStyle(this.Parent.Tabs[i].DomElement);
  1054. if(this.Parent.Tabs[i].IsBreak&&(this.Parent.Tabs[i].Selected)&&RadControlsNamespace.Browser.IsIE){
  1055. _30-=RadTabStripNamespace.Box.GetStyleValues(_2c,"marginTop");
  1056. }
  1057. if(_30==_2b||this==this.Parent.Tabs[i]){
  1058. _2d[_2d.length]=this.Parent.Tabs[i].DomElement.parentNode;
  1059. }
  1060. }
  1061. if(_2d.length==this.Parent.Tabs.length){
  1062. return;
  1063. }
  1064. var _31=this.DomElement.parentNode.parentNode;
  1065. for(var i=0;i<_2d.length;i++){
  1066. _2d[i].parentNode.removeChild(_2d[i]);
  1067. _31.appendChild(_2d[i]);
  1068. }
  1069. };;if(typeof (window.RadTabStripNamespace)=="undefined"){
  1070. window.RadTabStripNamespace=new Object();
  1071. }
  1072. if(typeof (window.RadControlsNamespace)=="undefined"){
  1073. window.RadControlsNamespace=new Object();
  1074. }
  1075. RadControlsNamespace.AppendStyleSheet=function(_1,_2,_3){
  1076. if(!_3){
  1077. return;
  1078. }
  1079. if(!_1){
  1080. document.write("<"+"link"+" rel='stylesheet' type='text/css' href='"+_3+"' />");
  1081. }else{
  1082. var _4=document.createElement("LINK");
  1083. _4.rel="stylesheet";
  1084. _4.type="text/css";
  1085. _4.href=_3;
  1086. document.getElementById(_2+"StyleSheetHolder").appendChild(_4);
  1087. }
  1088. };
  1089. RadTabStripNamespace.TabStripAlign={Left:0,Center:1,Right:2,Justify:3};
  1090. RadTabStripNamespace.GetChildren=function(_5,_6){
  1091. var _7=[];
  1092. var _8=_5.firstChild;
  1093. _6=_6.toLowerCase();
  1094. while(_8){
  1095. if(_8.nodeType==1&&_8.tagName.toLowerCase()==_6){
  1096. _7[_7.length]=_8;
  1097. }
  1098. _8=_8.nextSibling;
  1099. }
  1100. return _7;
  1101. };
  1102. function RadTabStrip(_9){
  1103. var _a=window[_9];
  1104.  
  1105. if(_a!=null&&typeof (_a.Dispose)=="function"){
  1106. _a.Dispose();
  1107. }
  1108. this.DomElement=document.getElementById(_9);
  1109. this.ChildStripDomElement=this.DomElement.getElementsByTagName("ul")[0];
  1110. this.StateField=document.getElementById(_9+"_Hidden");
  1111. this.Tabs=[];
  1112. this.AllTabs=[];
  1113. this.ID=_9;
  1114. this.LevelWraps=[];
  1115. this.LevelWraps[0]=this.ChildStripDomElement.parentNode;
  1116. RadControlsNamespace.EventMixin.Initialize(this);
  1117. this.SelectedTab=null;
  1118. this.SelectedIndex=-1;
  1119. this.IsVertical=false;
  1120. this.ReverseLevelOrder=false;
  1121. this.ScrollChildren=false;
  1122. this.EnableImmediateNavigation=true;
  1123. this.ScrollPosition=0;
  1124. this.ScrollButtonsPosition=RadControlsNamespace.ScrollButtonsPosition.Right;
  1125. this.PerTabScrolling=false;
  1126. this.MultiPageID="";
  1127. this.MultiPageClientID="";
  1128. this.CausesValidation=true;
  1129. this.ValidationGroup="";
  1130. this.Enabled=true;
  1131. this.Direction="ltr";
  1132. this.Align=RadTabStripNamespace.TabStripAlign.Left;
  1133. this.ReorderTabRows=false;
  1134. this.UnSelectChildren=false;
  1135. this.ClickSelectedTab=false;
  1136. this.OnClientTabSelected="";
  1137. this.OnClientTabSelecting="";
  1138. this.OnClientMouseOver="";
  1139. this.OnClientMouseOut="";
  1140. this.OnClientTabUnSelected="";
  1141. this.OnClientTabEnabled="";
  1142. this.OnClientTabDisabled="";
  1143. this.OnClientLoad="";
  1144. this.DepthLevel=0;
  1145. this.MaxLevel=0;
  1146. this.TabData={};
  1147. this.InPostBack=false;
  1148. this.Disposed=false;
  1149. this.InitialAllTabs=[];
  1150. this.TabsState={};
  1151. this.InUpdate=false;
  1152. this.Initialized=false;
  1153. }
  1154. RadTabStrip.prototype.Dispose=function(){
  1155. if(this.Disposed){
  1156. return;
  1157. }
  1158. this.Disposed=true;
  1159. try{
  1160. if(this.Scroll){
  1161. this.Scroll.Dispose();
  1162. }
  1163. for(var i=0;i<this.AllTabs.length;i++){
  1164. this.AllTabs[i].Dispose();
  1165. }
  1166. this.DisposeDomEventHandlers();
  1167. if(this.DomElement){
  1168. this.DomElement.RadShow=null;
  1169. this.DomElement.RadResize=null;
  1170. }
  1171. this.DomElement=null;
  1172. this.ChildStripDomElement=null;
  1173. this.StateField=null;
  1174. this.LevelWraps[0]=null;
  1175. }
  1176. catch(e){
  1177. }
  1178. };
  1179. RadTabStrip.prototype.MakeScrollable=function(_c){
  1180. var _d=RadControlsNamespace.Scroll.Create(_c.ChildStripDomElement,this.IsVertical,_c);
  1181. _d.WrapNeeded=true;
  1182. _d.Initialize();
  1183. _d.OnScrollStop=function(){
  1184. _c.OnScrollStop();
  1185. };
  1186. _c.Scroll=_d;
  1187. };
  1188. RadTabStrip.prototype.AlignElement=function(_e){
  1189. if(this.IsVertical){
  1190. if(_e.offsetHeight==0){
  1191. return;
  1192. }
  1193. if(this.Align==RadTabStripNamespace.TabStripAlign.Center){
  1194. RadTabStripNamespace.Align.Middle(_e);
  1195. }else{
  1196. if(this.Align==RadTabStripNamespace.TabStripAlign.Right){
  1197. RadTabStripNamespace.Align.Bottom(_e);
  1198. }else{
  1199. if(this.Align==RadTabStripNamespace.TabStripAlign.Justify){
  1200. RadTabStripNamespace.Align.VJustify(_e);
  1201. }
  1202. }
  1203. }
  1204. }else{
  1205. if(_e.offsetWidth==0){
  1206. return;
  1207. }
  1208. if(this.Align==RadTabStripNamespace.TabStripAlign.Center){
  1209. RadTabStripNamespace.Align.Center(_e);
  1210. }else{
  1211. if(this.Align==RadTabStripNamespace.TabStripAlign.Right){
  1212. RadTabStripNamespace.Align.Right(_e);
  1213. }else{
  1214. if(this.Align==RadTabStripNamespace.TabStripAlign.Justify){
  1215. RadTabStripNamespace.Align.Justify(_e);
  1216. }
  1217. }
  1218. }
  1219. }
  1220. };
  1221. RadTabStrip.prototype.FindTabById=function(id){
  1222. for(var i=0;i<this.AllTabs.length;i++){
  1223. if(this.AllTabs[i].ID==id){
  1224. return this.AllTabs[i];
  1225. }
  1226. }
  1227. return null;
  1228. };
  1229. RadTabStrip.prototype.FindTabByText=function(_11){
  1230. for(var i=0;i<this.AllTabs.length;i++){
  1231. if(this.AllTabs[i].Text==_11){
  1232. return this.AllTabs[i];
  1233. }
  1234. }
  1235. return null;
  1236. };
  1237. RadTabStrip.prototype.FindTabByValue=function(_13){
  1238. for(var i=0;i<this.AllTabs.length;i++){
  1239. if(this.AllTabs[i].Value==_13){
  1240. return this.AllTabs[i];
  1241. }
  1242. }
  1243. return null;
  1244. };
  1245. RadTabStrip.prototype.FindTabByUrl=function(url){
  1246. for(var i=0;i<this.AllTabs.length;i++){
  1247. if(this.AllTabs[i].DomElement.href==url){
  1248. return this.AllTabs[i];
  1249. }
  1250. }
  1251. return null;
  1252. };
  1253. RadTabStrip.prototype.GetAllTabs=function(){
  1254. return this.AllTabs;
  1255. };
  1256. RadTabStrip.prototype.RenderInProgress=function(){
  1257. return ((!this.IsVertical)&&this.ChildStripDomElement.offsetWidth==0)||(this.IsVertical&&this.ChildStripDomElement.offsetHeight==0);
  1258. };
  1259. RadTabStrip.prototype.ApplyAlign=function(){
  1260. if(this.RenderInProgress()){
  1261. return;
  1262. }
  1263. this.AlignElement(this.ChildStripDomElement);
  1264. var _17=this.SelectedTab;
  1265. while(_17){
  1266. if(!_17.ChildStripDomElement){
  1267. break;
  1268. }
  1269. this.AlignElement(_17.ChildStripDomElement);
  1270. _17=_17.SelectedTab;
  1271. }
  1272. };
  1273. RadTabStrip.prototype.Initialize=function(_18,_19){
  1274. this.LoadConfiguration(_18);
  1275. this.TabData=_19;
  1276. this.DetermineDirection();
  1277. this.ApplyRTL();
  1278. this.DisableEvents();
  1279. this.CreateControlHierarchy(this,this.ChildStripDomElement);
  1280. if(!this.Enabled){
  1281. this.Disable();
  1282. }
  1283. this.ApplyTabBreaks(this.ChildStripDomElement);
  1284. this.ApplyAlign();
  1285. if(this.LevelWraps.length==1){
  1286. this.ShowLevels(1);
  1287. }
  1288. if(this.ScrollChildren){
  1289. this.MakeScrollable(this);
  1290. }
  1291. this.ApplySelected();
  1292. this.EnableEvents();
  1293. RadControlsNamespace.DomEventMixin.Initialize(this);
  1294. this.AttachEventHandlers();
  1295. this.Initialized=true;
  1296. RadTabStrip.CreateState(this);
  1297. this.RaiseEvent("OnClientLoad",null);
  1298. this.RecordState();
  1299. };
  1300. RadTabStrip.CreateState=function(_1a){
  1301. _1a.InitialState={};
  1302. for(var i in _1a){
  1303. var _1c=typeof _1a[i];
  1304. if(_1c=="number"||_1c=="string"||_1c=="boolean"){
  1305. _1a.InitialState[i]=_1a[i];
  1306. }
  1307. }
  1308. };
  1309. RadTabStrip.prototype.AttachEventHandlers=function(){
  1310. this.HandleResize();
  1311. this.AttachDomEvent(window,"unload","Dispose");
  1312. this.AttachDomEvent(window,"load","HandleResize");
  1313. if(this.RenderInProgress()){
  1314. this.AttachDomEvent(window,"load","PopRowOnLoad");
  1315. }
  1316. this.AttachDomEvent(window,"resize","HandleResize");
  1317. var _1d=this;
  1318. this.DomElement.RadShow=function(){
  1319. _1d.HandleResize();
  1320. _1d.DomElement.style.cssText=_1d.DomElement.style.cssText;
  1321. };
  1322. this.DomElement.RadResize=function(){
  1323. _1d.HandleResize();
  1324. _1d.DomElement.style.cssText=_1d.DomElement.style.cssText;
  1325. };
  1326. };
  1327. RadTabStrip.prototype.PopRowOnLoad=function(){
  1328. if(this.ReorderTabRows&&this.SelectedTab){
  1329. this.SelectedTab.PopRow();
  1330. }
  1331. };
  1332. RadTabStrip.prototype.ApplySelected=function(){
  1333. for(var i=0;i<this.AllTabs.length;i++){
  1334. if(this.AllTabs[i].Selected){
  1335. this.AllTabs[i].Selected=false;
  1336. this.AllTabs[i].Select();
  1337. this.AllTabs[i].DomElement.style.cssText=this.AllTabs[i].DomElement.style.cssText;
  1338. }
  1339. }
  1340. };
  1341. RadTabStrip.prototype.HandleResize=function(){
  1342. this.ApplyAlign();
  1343. if(this.Scroll){
  1344. this.Scroll.ResizeHandler();
  1345. }
  1346. var _1f=this.SelectedTab;
  1347. while(_1f){
  1348. if(_1f.Scroll){
  1349. _1f.Scroll.ResizeHandler();
  1350. }
  1351. _1f=_1f.SelectedTab;
  1352. }
  1353. };
  1354. RadTabStrip.prototype.LoadConfiguration=function(_20){
  1355. for(var _21 in _20){
  1356. this[_21]=_20[_21];
  1357. }
  1358. };
  1359. RadTabStrip.prototype.ShowLevels=function(_22){
  1360. for(var i=0;i<=this.MaxLevel;i++){
  1361. var _24=i>_22?"none":"block";
  1362. if(this.LevelWraps[i].style.display!=_24){
  1363. this.LevelWraps[i].style.display=_24;
  1364. }
  1365. }
  1366. };
  1367. RadTabStrip.prototype.DetermineDirection=function(){
  1368. var el=this.DomElement;
  1369. while(el.tagName.toLowerCase()!="html"){
  1370. if(el.dir){
  1371. this.Direction=el.dir.toLowerCase();
  1372. return;
  1373. }
  1374. el=el.parentNode;
  1375. }
  1376. this.Direction="ltr";
  1377. };
  1378. RadTabStrip.prototype.ApplyTabBreaks=function(_26){
  1379. var lis=_26.getElementsByTagName("li");
  1380. for(var i=0;i<lis.length;i++){
  1381. var li=lis[i];
  1382. if(li.className.indexOf("break")==-1){
  1383. continue;
  1384. }
  1385. var a=li.getElementsByTagName("a")[0];
  1386. if(this.Direction=="rtl"&&li.firstChild.tagName.toLowerCase()=="a"){
  1387. a.style.cssFloat="right";
  1388. a.style.styleFloat="right";
  1389. }
  1390. }
  1391. };
  1392. RadTabStrip.prototype.CreateTab=function(_2b,_2c,_2d){
  1393. var tab=new RadTab(_2c);
  1394. tab.MaxZIndex=_2d;
  1395. tab.DepthLevel=_2b.DepthLevel+1;
  1396. tab.Parent=_2b;
  1397. tab.TabStrip=this;
  1398. tab.Index=_2b.Tabs.length;
  1399. tab.GlobalIndex=this.AllTabs.length;
  1400. return tab;
  1401. };
  1402. RadTabStrip.prototype.CreateTabObject=function(_2f,_30,_31){
  1403. var tab=this.CreateTab(_2f,_30,_31);
  1404. _2f.Tabs[_2f.Tabs.length]=tab;
  1405. this.AllTabs[this.AllTabs.length]=tab;
  1406. return tab;
  1407. };
  1408. RadTabStrip.prototype.CreateLevelWrap=function(_33){
  1409. if(this.LevelWraps[_33]){
  1410. return this.LevelWraps[_33];
  1411. }
  1412. this.LevelWraps[_33]=document.createElement("div");
  1413. this.LevelWraps[_33].style.display=_33>0?"none":"block";
  1414. if(this.ReverseLevelOrder&&_33>0){
  1415. this.DomElement.insertBefore(this.LevelWraps[_33],this.LevelWraps[_33-1]);
  1416. }else{
  1417. this.DomElement.appendChild(this.LevelWraps[_33]);
  1418. }
  1419. this.LevelWraps[_33].className="levelwrap level"+(_33+1);
  1420. if(this.Direction=="rtl"){
  1421. this.LevelWraps[_33].style.cssFloat="right";
  1422. this.LevelWraps[_33].style.styleFloat="right";
  1423. }
  1424. return this.LevelWraps[_33];
  1425. };
  1426. RadTabStrip.prototype.CreateControlHierarchy=function(_34,_35){
  1427. this.MaxLevel=Math.max(_34.DepthLevel,this.MaxLevel);
  1428. if(_34.DepthLevel>0){
  1429. this.CreateLevelWrap(_34.DepthLevel).appendChild(_35);
  1430. }
  1431. var lis=RadTabStripNamespace.GetChildren(_35,"li");
  1432. for(var i=0;i<lis.length;i++){
  1433. var li=lis[i];
  1434. var _39=li.getElementsByTagName("a")[0];
  1435. if(!_39){
  1436. continue;
  1437. }
  1438. _39.style.zIndex=lis.length-i;
  1439. var tab=this.CreateTabObject(_34,_39,lis.length);
  1440. tab.Initialize();
  1441. if(tab.ChildStripDomElement){
  1442. this.CreateControlHierarchy(tab,tab.ChildStripDomElement);
  1443. }
  1444. }
  1445. };
  1446. RadTabStrip.prototype.SelectPageView=function(tab){
  1447. if(!this.Initialized){
  1448. return;
  1449. }
  1450. if(this.MultiPageClientID==""||typeof (window[this.MultiPageClientID])=="undefined"||window[this.MultiPageClientID].innerHTML){
  1451. return;
  1452. }
  1453. var _3c=window[this.MultiPageClientID];
  1454. if(tab.NavigateAfterClick&&this.EnableImmediateNavigation){
  1455. _3c.NavigateAfterClick=true;
  1456. }
  1457. if(tab.PageViewID){
  1458. _3c.SelectPageById(tab.PageViewID);
  1459. }else{
  1460. _3c.SelectPageByIndex(tab.GlobalIndex);
  1461. }
  1462. };
  1463. RadTabStrip.prototype.ApplyRTL=function(){
  1464. if(this.Direction=="ltr"){
  1465. return;
  1466. }
  1467. if(RadControlsNamespace.Browser.IsIE){
  1468. this.DomElement.dir="ltr";
  1469. }
  1470. var lis=this.DomElement.getElementsByTagName("li");
  1471. if(this.IsVertical){
  1472. return;
  1473. }
  1474. for(var i=0;i<lis.length;i++){
  1475. if(lis[i].className.indexOf("break")>-1){
  1476. continue;
  1477. }
  1478. lis[i].style.styleFloat="right";
  1479. lis[i].style.cssFloat="right";
  1480. }
  1481. var uls=this.DomElement.getElementsByTagName("ul");
  1482. for(var i=0;i<uls.length;i++){
  1483. uls[i].style["clear"]="right";
  1484. }
  1485. var _40=this.Skin?this.Skin:"Default";
  1486. this.DomElement.className+=" tabstrip_rtl RadTabStrip_"+_40+"_rtl";
  1487. };
  1488. RadTabStrip.prototype.Enable=function(){
  1489. this.Enabled=true;
  1490. this.DomElement.disabled="";
  1491. this.InUpdate=true;
  1492. for(var i=0;i<this.AllTabs.length;i++){
  1493. this.AllTabs[i].Enable();
  1494. }
  1495. this.InUpdate=false;
  1496. this.RecordState();
  1497. };
  1498. RadTabStrip.prototype.Disable=function(){
  1499. this.Enabled=false;
  1500. this.DomElement.disabled="disabled";
  1501. this.InUpdate=true;
  1502. for(var i=0;i<this.AllTabs.length;i++){
  1503. this.AllTabs[i].Disable();
  1504. }
  1505. this.InUpdate=false;
  1506. this.RecordState();
  1507. };
  1508. RadTabStrip.prototype.RecordState=function(){
  1509. if(this.InUpdate||!this.Initialized||!this.Enabled){
  1510. return;
  1511. }
  1512. var _43=RadControlsNamespace.JSON.stringify(this,this.InitialState);
  1513. var _44=[];
  1514. for(var i in this.TabsState){
  1515. if(this.TabsState[i]==""){
  1516. continue;
  1517. }
  1518. if(typeof this.TabsState[i]=="function"){
  1519. continue;
  1520. }
  1521. _44[_44.length]=this.TabsState[i];
  1522. }
  1523. this.StateField.value="{\"State\":"+_43+",\"TabState\":{"+_44.join(",")+"}}";
  1524. };
  1525. RadTabStrip.prototype.OnScrollStop=function(){
  1526. this.RecordState();
  1527. };;if(typeof window.RadControlsNamespace=="undefined"){
  1528. window.RadControlsNamespace={};
  1529. }
  1530. RadControlsNamespace.ScrollButtonsPosition={Left:0,Middle:1,Right:2};
  1531. RadControlsNamespace.Scroll=function(_1,_2,_3){
  1532. this.Owner=_3;
  1533. this.Element=_1;
  1534. this.IsVertical=_2;
  1535. this.ScrollButtonsPosition=_3.ScrollButtonsPosition;
  1536. this.ScrollPosition=_3.ScrollPosition;
  1537. this.PerTabScrolling=_3.PerTabScrolling;
  1538. this.ScrollOnHover=false;
  1539. this.WrapNeeded=false;
  1540. this.LeaveGapsForArrows=true;
  1541. this.LeftArrowClass="leftArrow";
  1542. this.LeftArrowClassDisabled="leftArrowDisabled";
  1543. this.RightArrowClass="rightArrow";
  1544. this.RightArrowClassDisabled="rightArrowDisabled";
  1545. this.Initialized=false;
  1546. };
  1547. RadControlsNamespace.Scroll.Create=function(_4,_5,_6){
  1548. return new RadControlsNamespace.Scroll(_4,_5,_6);
  1549. };
  1550. RadControlsNamespace.Scroll.prototype.Initialize=function(){
  1551. if(this.Initialized){
  1552. this.ApplyOverflow();
  1553. this.CalculateMinMaxPosition();
  1554. this.EvaluateArrowStatus();
  1555. return false;
  1556. }
  1557. if((this.Element.offsetWidth==0&&!this.IsVertical)||(this.Element.offsetHeight==0&&this.IsVertical)){
  1558. return false;
  1559. }
  1560. this.Initialized=true;
  1561. this.ScrollAmount=2;
  1562. this.Direction=0;
  1563. if(this.WrapNeeded){
  1564. var _7=this.CreateScrollWrap();
  1565. }
  1566. this.ApplyOverflow();
  1567. this.Element.style.position="relative";
  1568. this.AttachArrows();
  1569. this.CalculateMinMaxPosition();
  1570. if(this.PerTabScrolling){
  1571. this.CalculateInitialTab();
  1572. }
  1573. this.AttachScrollMethods();
  1574. this.EvaluateArrowStatus();
  1575. this.AttachEventHandlers();
  1576. this.ScrollTo(this.ScrollPosition);
  1577. this.ApplyOverflow();
  1578. return _7;
  1579. };
  1580. RadControlsNamespace.Scroll.prototype.ApplyOverflow=function(){
  1581. if(RadControlsNamespace.Browser.IsIE){
  1582. this.Element.parentNode.style.overflow="visible";
  1583. if(this.IsVertical){
  1584. this.Element.parentNode.style.overflowX="";
  1585. this.Element.parentNode.style.overflowY="hidden";
  1586. }else{
  1587. this.Element.parentNode.style.overflowX="hidden";
  1588. this.Element.parentNode.style.overflowY="hidden";
  1589. }
  1590. }else{
  1591. this.Element.parentNode.style.overflow="hidden";
  1592. }
  1593. if(!this.ScrollNeeded()){
  1594. this.Element.parentNode.style.overflow="visible";
  1595. this.Element.parentNode.style.overflowX="visible";
  1596. this.Element.parentNode.style.overflowY="visible";
  1597. }
  1598. };
  1599. RadControlsNamespace.Scroll.prototype.ResizeHandler=function(){
  1600. if(this.Disposed){
  1601. return;
  1602. }
  1603. if(!this.Initialized){
  1604. this.Initialize();
  1605. }
  1606. if(!this.Initialized){
  1607. return;
  1608. }
  1609. if(!this.Element.offsetHeight||!this.Element.offsetWidth){
  1610. return;
  1611. }
  1612. this.CalculateMinMaxPosition();
  1613. if(this.Element.offsetWidth<this.Element.parentNode.offsetWidth){
  1614. this.ScrollTo(0);
  1615. }
  1616. var _8=parseInt(this.IsVertical?this.Element.style.top:this.Element.style.left);
  1617. if(isNaN(_8)){
  1618. _8=0;
  1619. }
  1620. var _9=this;
  1621. };
  1622. RadControlsNamespace.Scroll.prototype.AttachEventHandlers=function(){
  1623. var _a=this.Element;
  1624. var _b=this;
  1625. this.resizeClosure=function(){
  1626. _b.ResizeHandler();
  1627. };
  1628. if(window.addEventListener){
  1629. window.addEventListener("resize",this.resizeClosure,false);
  1630. }else{
  1631. window.attachEvent("onresize",this.resizeClosure);
  1632. }
  1633. };
  1634. RadControlsNamespace.Scroll.prototype.Dispose=function(){
  1635. this.Disposed=true;
  1636. this.Element=null;
  1637. clearTimeout(this.intervalPointer);
  1638. if(window.removeEventListener){
  1639. window.removeEventListener("resize",this.resizeClosure,false);
  1640. }else{
  1641. window.detachEvent("onresize",this.resizeClosure);
  1642. }
  1643. };
  1644. RadControlsNamespace.Scroll.prototype.AttachArrows=function(){
  1645. var _c=this.CreateArrow("«",1,this.LeftArrowClass);
  1646. var _d=this.CreateArrow("»",-1,this.RightArrowClass);
  1647. this.LeftArrow=_c;
  1648. this.RightArrow=_d;
  1649. if(this.IsVertical){
  1650. _c.style.left="0px";
  1651. _d.style.left="0px";
  1652. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){
  1653. _c.style.top="0px";
  1654. _d.style.bottom="0px";
  1655. }else{
  1656. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){
  1657. _c.style.top="0px";
  1658. _d.style.top=_c.offsetHeight+"px";
  1659. }else{
  1660. _d.style.bottom="0px";
  1661. _c.style.bottom=_c.offsetHeight+"px";
  1662. }
  1663. }
  1664. }else{
  1665. _c.style.top="0px";
  1666. _d.style.top="0px";
  1667. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){
  1668. _c.style.left="-1px";
  1669. _d.style.right="-1px";
  1670. }else{
  1671. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){
  1672. _c.style.left="-1px";
  1673. _d.style.left=(_c.offsetWidth-1)+"px";
  1674. }else{
  1675. _d.style.right="-1px";
  1676. _c.style.right=(_d.offsetWidth-1)+"px";
  1677. }
  1678. }
  1679. }
  1680. };
  1681. RadControlsNamespace.Scroll.prototype.CreateArrow=function(_e,_f,_10){
  1682. var _11=document.createElement("a");
  1683. _11.href="#";
  1684. _11.className=_10;
  1685. _11.style.zIndex="2000";
  1686. _11.appendChild(document.createTextNode(" "));
  1687. this.Element.parentNode.appendChild(_11);
  1688. var _12=this;
  1689. _11.ScrollDirection=_f;
  1690. if(this.ScrollOnHover){
  1691. _11.onmousedown=function(){
  1692. if(this.disabled){
  1693. return false;
  1694. }
  1695. _12.ScrollAmount=3;
  1696. return true;
  1697. };
  1698. _11.onmouseup=function(){
  1699. _12.ScrollAmount=1;
  1700. };
  1701. _11.onmouseover=function(){
  1702. if(this.disabled){
  1703. return false;
  1704. }
  1705. _12.ScrollAmount=1;
  1706. _12.Scroll(this.ScrollDirection);
  1707. return true;
  1708. };
  1709. _11.onmouseout=function(){
  1710. _12.scrollAmount=0;
  1711. _12.Stop();
  1712. return false;
  1713. };
  1714. }else{
  1715. _11.onmousedown=function(){
  1716. _12.Scroll(this.ScrollDirection);
  1717. };
  1718. _11.onmouseup=function(){
  1719. _12.Stop();
  1720. };
  1721. }
  1722. _11.onclick=function(){
  1723. return false;
  1724. };
  1725. return _11;
  1726. };
  1727. RadControlsNamespace.Scroll.prototype.SetHeight=function(_13){
  1728. if(parseInt(_13)==0){
  1729. return;
  1730. }
  1731. this.Element.parentNode.style.height=_13;
  1732. this.Initialize();
  1733. };
  1734. RadControlsNamespace.Scroll.prototype.SetWidth=function(_14){
  1735. if(parseInt(_14)==0){
  1736. return;
  1737. }
  1738. this.Element.parentNode.style.width=_14;
  1739. this.Initialize();
  1740. };
  1741. RadControlsNamespace.Scroll.prototype.CreateScrollWrap=function(){
  1742. var _15=document.createElement("div");
  1743. var _16=this.Element.parentNode;
  1744. _15.appendChild(this.Element);
  1745. _15.style.position="relative";
  1746. _15.align="left";
  1747. _16.appendChild(_15);
  1748. if(this.IsVertical){
  1749. _15.style.styleFloat="left";
  1750. _15.style.cssFloat="left";
  1751. this.Element.style.display="none";
  1752. _15.style.height=_15.parentNode.parentNode.offsetHeight+"px";
  1753. this.Element.style.display="block";
  1754. }else{
  1755. var _17=0;
  1756. for(var i=0;i<this.Element.childNodes.length;i++){
  1757. var _19=this.Element.childNodes[i];
  1758. if(!_19.tagName){
  1759. continue;
  1760. }
  1761. _17+=_19.offsetWidth;
  1762. }
  1763. this.Element.style.width=(_17+3)+"px";
  1764. }
  1765. return _15;
  1766. };
  1767. RadControlsNamespace.Scroll.prototype.CalculateMinMaxPosition=function(){
  1768. if(!this.Initialized){
  1769. return;
  1770. }
  1771. if(this.IsVertical){
  1772. var _1a=this.Element.parentNode.offsetHeight-this.Element.offsetHeight;
  1773. var _1b=this.LeftArrow.offsetHeight;
  1774. var _1c=this.RightArrow.offsetHeight;
  1775. }else{
  1776. var _1a=this.Element.parentNode.offsetWidth-this.Element.offsetWidth;
  1777. var _1b=this.LeftArrow.offsetWidth;
  1778. var _1c=this.RightArrow.offsetWidth;
  1779. }
  1780. if(!this.LeaveGapsForArrows){
  1781. _1b=0;
  1782. _1c=0;
  1783. }
  1784. this.MaxScrollPosition=0;
  1785. this.MinScrollPosition=_1a-_1c-_1b;
  1786. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){
  1787. this.Offset=_1b;
  1788. }else{
  1789. if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){
  1790. this.Offset=_1b+_1c;
  1791. }else{
  1792. this.Offset=0;
  1793. }
  1794. }
  1795. };
  1796. RadControlsNamespace.Scroll.prototype.CalculateInitialTab=function(){
  1797. var lis=this.Element.getElementsByTagName("li");
  1798. if(lis.length>0){
  1799. var i=0;
  1800. while(this.ScrollPosition<-(this.IsVertical?lis[i].offsetTop:lis[i].offsetLeft)){
  1801. i++;
  1802. }
  1803. this.CurrentTab=i;
  1804. }
  1805. };
  1806. RadControlsNamespace.Scroll.prototype.AttachScrollMethods=function(){
  1807. if(this.PerTabScrolling){
  1808. this.Scroll=RadControlsNamespace.Scroll.StartPerTabScroll;
  1809. this.Stop=RadControlsNamespace.Scroll.StopPerTabScroll;
  1810. }else{
  1811. this.Scroll=RadControlsNamespace.Scroll.StartSmoothScroll;
  1812. this.Stop=RadControlsNamespace.Scroll.StopSmoothScroll;
  1813. }
  1814. };
  1815. RadControlsNamespace.Scroll.prototype.EvaluateArrowStatus=function(){
  1816. var _1f=!(this.ScrollPosition>this.MinScrollPosition);
  1817. var _20=!(this.ScrollPosition<this.MaxScrollPosition);
  1818. this.RightArrow.disabled=_1f;
  1819. this.LeftArrow.disabled=_20;
  1820. if(_20){
  1821. if(this.LeftArrow.className!=this.LeftArrowClassDisabled){
  1822. this.LeftArrow.className=this.LeftArrowClassDisabled;
  1823. }
  1824. }else{
  1825. if(this.LeftArrow.className!=this.LeftArrowClass){
  1826. this.LeftArrow.className=this.LeftArrowClass;
  1827. }
  1828. }
  1829. if(_1f){
  1830. if(this.RightArrow.className!=this.RightArrowClassDisabled){
  1831. this.RightArrow.className=this.RightArrowClassDisabled;
  1832. }
  1833. }else{
  1834. if(this.RightArrow.className!=this.RightArrowClass){
  1835. this.RightArrow.className=this.RightArrowClass;
  1836. }
  1837. }
  1838. };
  1839. RadControlsNamespace.Scroll.StartSmoothScroll=function(_21){
  1840. this.Stop();
  1841. this.Direction=_21;
  1842. var _22=this;
  1843. var _23=function(){
  1844. _22.ScrollBy(_22.Direction*_22.ScrollAmount);
  1845. };
  1846. _23();
  1847. this.scrollInterval=setInterval(_23,10);
  1848. };
  1849. RadControlsNamespace.Scroll.prototype.ScrollTo=function(_24){
  1850. _24=Math.max(_24,this.MinScrollPosition);
  1851. _24=Math.min(_24,this.MaxScrollPosition);
  1852. _24+=this.Offset;
  1853. if(this.IsVertical){
  1854. this.Element.style.top=_24+"px";
  1855. }else{
  1856. this.Element.style.left=_24+"px";
  1857. }
  1858. this.Owner.ScrollPosition=this.ScrollPosition=_24-this.Offset;
  1859. this.EvaluateArrowStatus();
  1860. };
  1861. RadControlsNamespace.Scroll.prototype.ScrollBy=function(_25){
  1862. var _26=this.ScrollPosition;
  1863. this.ScrollTo(_26+_25);
  1864. };
  1865. RadControlsNamespace.Scroll.StartPerTabScroll=function(_27){
  1866. this.Stop();
  1867. var lis=this.Element.getElementsByTagName("li");
  1868. var _29=this.CurrentTab-_27;
  1869. if(_29<0||_29>lis.length){
  1870. return;
  1871. }
  1872. var _2a=_27==-1?this.CurrentTab:_29;
  1873. this.CurrentTab=_29;
  1874. if(this.IsVertical){
  1875. var _2b=lis[_2a].offsetHeight;
  1876. }else{
  1877. var _2b=lis[_2a].offsetWidth;
  1878. }
  1879. this.ScrollBy(_2b*_27);
  1880. this.EvaluateArrowStatus();
  1881. };
  1882. RadControlsNamespace.Scroll.prototype.ScrollNeeded=function(){
  1883. return true;
  1884. if(this.IsVertical){
  1885. return this.Element.offsetHeight>this.Element.parentNode.offsetHeight;
  1886. }
  1887. return this.Element.offsetWidth>this.Element.parentNode.offsetWidth;
  1888. };
  1889. RadControlsNamespace.Scroll.StopSmoothScroll=function(_2c){
  1890. if(this.OnScrollStop){
  1891. this.OnScrollStop();
  1892. }
  1893. clearInterval(this.scrollInterval);
  1894. };
  1895. RadControlsNamespace.Scroll.StopPerTabScroll=function(_2d){
  1896. if(this.OnScrollStop){
  1897. this.OnScrollStop();
  1898. }
  1899. };;